<template>
  <div id="app">
    <div id="nav">
      <router-link to="/"></router-link>
    </div>
    <router-view />
  </div>
</template>

<script>
export default {
  mounted() {
    this.resize();
    window.onresize = () => {
      this.resize();
    };
  },
  methods: {
    resize: () => {
      let htmlwidth =
        document.documentElement.clientWidth || document.body.clientWidth;
      let htmlDom = document.getElementsByTagName("html")[0];
      if (htmlwidth > 750) {
        htmlwidth = 750;
      }
      htmlDom.style.fontSize = htmlwidth / 7.5 + "px";
    }
  }
};
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
